package com.baizhi.service.impl;

import com.baizhi.dao.UltramanDao;
import com.baizhi.entity.Ultraman;
import com.baizhi.service.UltramanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UltramanServiceImpl implements UltramanService {
    @Autowired
    private UltramanDao ultramanDao;
    public void setUltamanDao(UltramanDao ultamanDao) {
        this.ultramanDao = ultramanDao;
    }


    @Override
    public List<Ultraman> selectUltraman(Integer pageNum, Integer pageSize) {
        return ultramanDao.selectUltraman(pageNum, pageSize);
    }

    @Override
    public Ultraman selectUltramanById(Integer id) {
        return ultramanDao.selectUltramanById(id);
    }

    @Override
    public void insertUltraman(Ultraman ultraman) {
        ultramanDao.insertUltraman(ultraman);
    }

    @Override
    public void deleteUltramanById(Integer id) {
        ultramanDao.deleteUltramanById(id);
    }

    @Override
    public void updateUltraman(Ultraman ultraman) {
        ultramanDao.updateUltraman(ultraman);
    }
}
